home *** CD-ROM | disk | FTP | other *** search
/ Aminet 39 / Aminet 39 (2000)(Schatztruhe)[!][Oct 2000].iso / Aminet / biz / swood / FW_AllInOne.lha / Makros / Verweise < prev    next >
Text File  |  1998-01-18  |  15KB  |  681 lines

  1. /* Optimized with RexxOpt 1.7 */
  2.  
  3. Parse ARG FW
  4. if ~show('L',"rexxreqtools.library") then
  5. if ~addlib('rexxreqtools.library',0,-30,0) then;do
  6. ShowMessage 1 1 '"Fehler...." "Benötige Libs:rexxreqtools.library" " A B B R U C H ! !" "Okay" "" ""'
  7. exit
  8. end
  9. IF ~show('L','tritonrexx.library') then
  10. IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN;DO
  11. ShowMessage 2 1 '"Fehler...." "Benötige Libs:tritonrexx.library" "" "Abbruch" "" ""'
  12. exit
  13. END
  14. R='0A'X
  15. SIGNAL ON SYNTAX
  16. If FW='' then;do
  17. Address='FinalW'
  18. Options results
  19. STATUS PORTNAME
  20. FW=result
  21. End
  22. address(FW)
  23. CtrlUp;ShiftUp;AltUp
  24. address "REXX"
  25. If open('Hilfe',"S:FW_Paket.prefs","R") then;do
  26. HilfeVerz=readln('Hilfe')
  27. Call Close('Hilfe')
  28. End
  29. else HilfeVerz=''
  30. If exists("S:FW_Verweise.prefs") then;do
  31. Call open("prefs","S:FW_Verweise.prefs","R")
  32. Schablone=Readln("prefs")
  33. Call close("prefs")
  34. end
  35. else Schablone="(siehe Kapitel %k, Abschnitt %a, Seite %s)"
  36. address(FW)
  37. GetSectionList "¤"
  38. IF Pos("Verweise",Result)=0 THEN;do
  39. Disi=1;VN=1
  40. End
  41. else;do
  42. Disi=0;VN=0
  43. end
  44. apptags='TRCA_Name     Verweise',
  45. 'TRCA_LongName "Verweise"',
  46. 'TRCA_Info     "für FinalWriter"',
  47. 'TRCA_Version  "1.0 registered"',
  48. 'TRCA_Release  "1"',
  49. 'TRCA_Date     "09.01.98"',
  50. 'TAG_END'
  51. windowtags=WindowID(1),
  52. WindowPosition('TRWP_CENTERDISPLAY'),
  53. WindowFlags('TRWF_NOMINTEXTWIDTH'),
  54. PubScreenName('FinalWriterPubScreen'),
  55. WindowTitle("Verweise"),
  56. BeginMenu('Projekt'),
  57. MenuItem('Q_Verlassen',104),
  58. BeginMenu('?'),
  59. MenuItem('?_Info',101),
  60. MenuItem('H_Hilfe',103),
  61. 'HorizGroupAC SpaceS',
  62. 'VertGroupAC SpaceS',
  63. Button('Verweis_name setzen',1),
  64. 'SpaceS',
  65. TextN('Verweisname:'),
  66. StringGadget("",9) 'TRAT_DISABLED 1',
  67. 'Space',
  68. Button('Verweisname _löschen',2) 'TRAT_DISABLED' Disi,
  69. 'SpaceS',
  70. Button('Verweis _setzen',3) 'TRAT_DISABLED' VN,
  71. 'SpaceS',
  72. TextID('_Format:',8),
  73. 'SpaceS',
  74. StringGadget(Schablone,8),
  75. 'Space',
  76. Button('Verweise _aktualisieren',4) 'TRAT_DISABLED' Disi,
  77. 'SpaceS',
  78. Button('Verweise _erstellen',10) 'TRAT_DISABLED' Disi,
  79. 'SpaceS',
  80. 'EndGroup SpaceS',
  81. 'EndGroup SpaceS',
  82. 'EndProject'
  83. app=TR_CREATEAPP('TRCA_Name Verweise')
  84. IF app ~='00000000'x THEN;DO
  85. window1=TR_OPENPROJECT(app,windowtags)
  86. IF window1 ~='00000000'x THEN;DO
  87. ende=0
  88. DO WHILE ~ende
  89. CALL TR_WAIT(app,'')
  90. DO WHILE TR_HANDLEMSG(app,'event')
  91. IF event.trm_class='TRMS_CLOSEWINDOW' THEN ende=1
  92. IF event.trm_class='TRMS_NEWVALUE' THEN;DO
  93. SELECT
  94. WHEN event.trm_id=9 THEN;Do
  95. VText=TR_GETATTRIBUTE(window1,9,'TROB_String')
  96. VText=VText||" "
  97. Call TR_SETATTRIBUTE(window1,9,'TRAT_DISABLED',1)
  98. If VText~=" " then Call VNsetzen
  99. END
  100. OTHERWISE NOP
  101. END
  102. END
  103. IF event.trm_class='TRMS_ACTION' THEN;DO
  104. SELECT
  105. WHEN event.trm_id=1 THEN;Do
  106. address(FW)
  107. status ParaPos
  108. VPos=Result
  109. IF Words(VPos)=2 THEN;DO
  110. ShowMessage 1 1 '"Leider ist kein Text markiert!"                        "Bitte markieren Sie den Text auf den später Bezug genommen werden soll." ""                        "Klick" "" ""'
  111. END
  112. else;do
  113. Call TR_SETATTRIBUTE(window1,9,'TRAT_DISABLED',0)
  114. Call TR_SendMessage(window1,9,'TROM_ACTIVATE',0)
  115. End
  116. END
  117. WHEN event.trm_id=2 THEN Call Vloeschen
  118. WHEN event.trm_id=3 THEN;do
  119. akt=0
  120. Call Vsetzen
  121. End
  122. WHEN event.trm_id=4 THEN;do
  123. akt=1
  124. Call Vsetzen
  125. End
  126. WHEN event.trm_id=10 THEN Call Verstellen
  127. WHEN event.trm_id=101 THEN Call rtezrequest("Aus dem Makro-Paket:"||R||R||"Verweise V1.0 für FW"||R||"© 1998 Heiko Schröder","Danke für Ihre Registrierung.","Info","rt_pubscrname=FinalWriterPubScreen")
  128. WHEN event.trm_id=103 THEN address command "run Multiview PUBSCREEN=FinalWriterPubScreen "||d2c(34)||HilfeVerz||"Verweise.guide"||d2c(34)
  129. WHEN event.trm_id=104 THEN ende=1
  130. OTHERWISE NOP
  131. END
  132. END
  133. END
  134. END
  135. Schablone=TR_GETATTRIBUTE(window1,8,'TROB_String')
  136. CALL TR_CLOSEPROJECT(window1)
  137. END
  138. CALL TR_DELETEAPP(app)
  139. END
  140. ELSE
  141. CALL quit('Kann das Fenster nicht öffnen',10)
  142. address "REXX"
  143. Call open("prefs","S:FW_Verweise.prefs","W")
  144. Writeln('prefs',Schablone)
  145. Call close("prefs")
  146. Exit
  147. VNSetzen:
  148. address(FW)
  149. GetSectionSetup Name
  150. Abschnitt=result
  151. IF Abschnitt="Verweise" THEN;DO
  152. ShowMessage 1 1 '"Sie befinden sich im Abschnitt: VERWEISE." "Hier können keine Verweisnamen gesetzt werden!" ""      "Klick" "" ""'
  153. Return
  154. End
  155. GetDocItemPrefs Decimal
  156. Punkt=Result
  157. If Punkt="Comma" then DocItemPrefs DECIMAL Period
  158. VName=TR_GETATTRIBUTE(window1,9,'TROB_String')
  159. Copy
  160. GetSectionList "¤"
  161. IF Pos("Verweise",Result)=0 THEN;DO
  162. NewSection Text Name "Verweise"
  163. SectionSetup Top 0 Bottom 0 Inside 2 Outside 0
  164. SectionSetup Header 2.4
  165. EditRightMaster
  166. FontSize 20
  167. Style UnderLine
  168. Type "Abschnitt für die Verweise"
  169. Style Normal;NewParagraph
  170. Type "Bitte NICHTS verändern."
  171. EditBody
  172. SetTab "0.5" Left
  173. SetTab "3" Left
  174. SetTab "6" Left
  175. LeftMargin "6"
  176. FontSize 4
  177. TYPE "ð"
  178. END
  179. ELSE GoToSection "Verweise"
  180. AltDown;CtrlDown;Cursor Down;CtrlUp;AltUp
  181. Cursor Left
  182. Status LinePos
  183. Line=Word(result,1)
  184. If Line>1 then;do
  185. Cursor Up
  186. EXTRACT
  187. DO WHILE RESULT~="ð"
  188. Line=Line-1
  189. If Line=0 then Leave
  190. MoveToLine Line 0
  191. Extract
  192. END
  193. Cursor Right
  194. Nummer=0
  195. Extract
  196. DO WHILE ((RESULT<":")&(RESULT>"/"))
  197. Nummer=Nummer*10+Result
  198. cursor Right
  199. Extract
  200. END
  201. End
  202. Else Nummer=0
  203. Nummer=Nummer+1
  204. AltDown;CtrlDown;Cursor Down;CtrlUp;AltUp
  205. IF Nummer<10 THEN TYPE 0||Nummer
  206. ELSE TYPE Nummer
  207. TYPE X2C(09);NewParagraph
  208. TYPE "ð"
  209. cursor Up
  210. AltDown;CtrlDown;Cursor Right;CtrlUp;AltUp
  211. Type Abschnitt
  212. TYPE X2C(09)
  213. FontSize 12
  214. Type VName
  215. TYPE X2C(09)
  216. Status ParaPos
  217. Merke=result
  218. Paste
  219. ShiftDown;MoveToPara Merke;ShiftUp
  220. FontSize 4
  221. GoToSection Abschnitt
  222. MoveToPara Word(VPos,3) Word(VPos,4)
  223. Status FontWidth
  224. OldWidth=result
  225. STATUS FontColor
  226. OldColor=result
  227. Width 4
  228. FontColor "Weiß"
  229. Type "ð"
  230. IF Nummer<10 THEN TYPE "0"||Nummer
  231. ELSE TYPE Nummer
  232. FontColor OldColor
  233. Width OldWidth
  234. EXTRACT
  235. IF Result~=" " THEN
  236. IF Pos(Result,".,!?)")~=0 THEN TYPE " "
  237. ELSE NOP
  238. ELSE Cursor Right
  239. Disi=0
  240. Call TR_SETATTRIBUTE(window1,2,'TRAT_DISABLED',0)
  241. Call TR_SETATTRIBUTE(window1,4,'TRAT_DISABLED',0)
  242. Call TR_SETATTRIBUTE(window1,10,'TRAT_DISABLED',0)
  243. Call TR_SETATTRIBUTE(window1,3,'TRAT_DISABLED',0)
  244. Return
  245. Vsetzen:
  246. CtrlUp;ShiftUp;AltUp
  247. Status ParaPos
  248. Zurueck=result
  249. GetSectionSetup Name
  250. MerkeAbschnitt=Result
  251. RedrawOff
  252. call Time('R')
  253. Schablone=TR_GETATTRIBUTE(window1,8,'TROB_String')
  254. MerkeSchablone=Schablone
  255. SetFind WRAP NO
  256. FIND "ð"
  257. loeschen=0
  258. Call VerweiseSuchen
  259. If akt=0 then;do
  260. Call Fenster
  261. If Nummer=0 then return
  262. EXTRACT
  263. IF Pos(Result,".,!?)")~=0 THEN NOP
  264. ELSE;DO
  265. Cursor Left
  266. EXTRACT
  267. IF Result~=" " THEN Cursor Right
  268. Cursor Right
  269. End
  270. Status FontSize
  271. OldSize=Result
  272. linken=1;loeschen=0
  273. Call SchabloneAuswerten
  274. End
  275. If akt=1 then;do
  276. GetSectionList "ð"
  277. Anz=0
  278. temp=result
  279. Do ForEver
  280. a=pos("ð",temp)
  281. Anz=Anz+1
  282. If a=0 then;do
  283. Abschnitte.Anz=temp
  284. Leave
  285. End
  286. Abschnitte.Anz=Left(temp,a-1)
  287. temp=Delstr(temp,1,a)
  288. End
  289. Abschnitte.0=Anz
  290. Do i=1 to Abschnitte.0
  291. GotoSection Abschnitte.i
  292. MoveToLine 1 0
  293. Do ForEver
  294. Find "æ"
  295. If RC~=0 then Break
  296. Status ParaPos
  297. Anfpos=Word(result,1) Word(result,2)
  298. Cursor Right
  299. VKennung.i=0
  300. EXTRACT
  301. DO WHILE ((RESULT<":")&(RESULT>"/"))
  302. VKennung.i=VKennung.i*10+Result
  303. Cursor Right
  304. Extract
  305. END
  306. Do Nummer=1 to Verweis.0
  307. If Verweis.Nummer=VKennung.i then Break
  308. End
  309. IF VKennung.i<10 THEN FIND ("æ0"VKennung.i)
  310. ELSE FIND ("æ"VKennung.i)
  311. Status ParaPos
  312. EndPos=Word(result,3) Word(result,4)
  313. MoveToPara AnfPos
  314. Status FontSize
  315. OldSize=Result
  316. ShiftDown
  317. MoveToPara EndPos
  318. ShiftUp
  319. linken=1;loeschen=1
  320. Call SchabloneAuswerten
  321. End
  322. End
  323. End
  324. GotoSection MerkeAbschnitt
  325. RedrawOn
  326. Redraw
  327. say Time('E')
  328. Return
  329. Vloeschen:
  330. Status ParaPos
  331. Zurueck=result
  332. GetSectionSetup Name
  333. MerkeAbschnitt=Result
  334. GotoSection "Verweise"
  335. If RC~=0 then;do
  336. ShowMessage 1 1 '"Keine Verweisnamen vorhanden!" "" ""      "Klick" "" ""'
  337. Return
  338. end
  339. RedrawOff
  340. call Time('R')
  341. GetSectionList "ð"
  342. Anz=0
  343. temp=result
  344. Do ForEver
  345. a=pos("ð",temp)
  346. Anz=Anz+1
  347. If a=0 then;do
  348. Abschnitte.Anz=temp
  349. Leave
  350. End
  351. Abschnitte.Anz=Left(temp,a-1)
  352. temp=Delstr(temp,1,a)
  353. End
  354. Abschnitte.0=Anz
  355. SetFind WRAP NO
  356. FIND "ð"
  357. loeschen=1
  358. Call VerweiseSuchen
  359. GotoSection MerkeAbschnitt
  360. Call Fenster
  361. loeschen=0
  362. If Nummer=0 then;do
  363. MoveToPara Zurueck
  364. Return
  365. End
  366. CtrlUp;AltUp;ShiftUp
  367. Schongefragt=0
  368. Do i=1 to Abschnitte.0
  369. GotoSection Abschnitte.i
  370. Do ForEver
  371. MoveToLine 1 0
  372. IF Verweis.Nummer<10 THEN FIND ("æ0"Verweis.Nummer)
  373. ELSE FIND ("æ"Verweis.Nummer)
  374. If RC~=0 then Break
  375. If (RC=0&SchonGefragt=0) then;do
  376. ShowMessage 1 1 '"Es sind schon Verweise gesetzt, die sich"            "auf den Verweisnamen - ' VName.Nummer '- beziehen!"            "Soll der Verweisname trotzdem gelöscht werden?"            "Ja" "Nein" ""'
  377. IF Result=2 then;do
  378. MoveToPara Zurueck
  379. Return
  380. End
  381. SchonGefragt=1
  382. End
  383. Status ParaPos
  384. AnfPos=Word(result,1) Word(result,2)
  385. Cursor Right
  386. FindNext
  387. Status ParaPos
  388. EndPos=Word(result,3) Word(result,4)
  389. MoveToPara AnfPos;ShiftDown;MoveToPara EndPos;ShiftUp
  390. Delete
  391. End
  392. End
  393. GotoSection Abschnitt.Nummer
  394. MoveToLine 1 0
  395. IF Verweis.Nummer<10 THEN FIND ("ð0"Verweis.Nummer)
  396. ELSE FIND ("ð"Verweis.Nummer)
  397. If RC=0 then Delete
  398. Call RemoveVerweise
  399. GotoSection MerkeAbschnitt
  400. MoveToPara Zurueck
  401. Return
  402. Verstellen:
  403. CtrlUp;ShiftUp;AltUp
  404. ShowMessage 1 1 '"Verweise endgültig erstellen..."   "Hiermit werden nochmals alle Verweise aktualisiert."   "und danach sämtliche Verweiskennungen gelöscht."   "Weiter" "Abbrechen" ""'
  405. IF Result=2 THEN Return
  406. Status ParaPos
  407. Zurueck=result
  408. Schablone=TR_GETATTRIBUTE(window1,8,'TROB_String')
  409. MerkeSchablone=Schablone
  410. Status FileName
  411. IF POS(".VW",Result)=0 THEN;DO
  412. ShowMessage 1 1 '"Die Datei wird jetzt abgespeichert!"      "Es wird eine neue Datei mit dem Zusatz .VW erstellt!"      "In dieser befinden sich keine Verweiskennungen mehr."      "Weiter" "Abbrechen" ""'
  413. IF Result=2 THEN Return
  414. SAVE
  415. Status PathName
  416. DokName=result
  417. If DokName="" then Return
  418. END
  419. Else;do
  420. ShowMessage 1 1 '"Die Verweiskennungen sind schon gelöscht worden!"      "Bitte benutzen Sie die Datei ohne die Endung: .VW" ""      "Klick" "" ""'
  421. return
  422. End
  423. GetSectionSetup Name
  424. MerkeAbschnitt=Result
  425. RedrawOff
  426. call Time('R')
  427. SetFind WRAP NO
  428. FIND "ð"
  429. loeschen=1
  430. Call VerweiseSuchen
  431. RemoveSection "Verweise" FORCE
  432. GetSectionList "ð"
  433. Anz=0
  434. temp=result
  435. Do ForEver
  436. a=pos("ð",temp)
  437. Anz=Anz+1
  438. If a=0 then;do
  439. Abschnitte.Anz=temp
  440. Leave
  441. End
  442. Abschnitte.Anz=Left(temp,a-1)
  443. temp=Delstr(temp,1,a)
  444. End
  445. Abschnitte.0=Anz
  446. Do i=1 to Abschnitte.0
  447. GotoSection Abschnitte.i
  448. MoveToLine 1 0
  449. Do ForEver
  450. Find "æ"
  451. If RC~=0 then Break
  452. Status ParaPos
  453. Anfpos=Word(result,1) Word(result,2)
  454. Cursor Right
  455. VKennung.i=0
  456. EXTRACT
  457. DO WHILE ((RESULT<":")&(RESULT>"/"))
  458. VKennung.i=VKennung.i*10+Result
  459. Cursor Right
  460. Extract
  461. END
  462. Do Nummer=1 to Verweis.0
  463. If Verweis.Nummer=VKennung.i then Break
  464. End
  465. IF VKennung.i<10 THEN FIND ("æ0"VKennung.i)
  466. ELSE FIND ("æ"VKennung.i)
  467. Status ParaPos
  468. EndPos=Word(result,3) Word(result,4)
  469. MoveToPara AnfPos
  470. ShiftDown
  471. Status FontSize
  472. OldSize=Result
  473. MoveToPara EndPos
  474. ShiftUp
  475. linken=0
  476. Call SchabloneAuswerten
  477. End
  478. End
  479. RedrawOn
  480. Redraw
  481. GotoSection MerkeAbschnitt
  482. MoveToPara Zurueck
  483. say Time('E')
  484. SAVE DokName".VW"
  485. ShowMessage 1 1 '"Die Verweiskennungen wurden gelöscht."   "Bitte schließen Sie das Fenster: Suchen"   ""   "Klick" "" ""'
  486. ShowMessage 1 1 '"Sollten Sie an diesem Dokument weiterarbeiten wollen"   "so benutzen Sie bitte die Datei ohne "   "die Endung: .VW"   "Klick" "" ""'
  487. Return
  488. VerweiseSuchen:
  489. GoToSection "Verweise"
  490. MoveToLine 1 0
  491. a=0;i=0
  492. DO ForEver
  493. FindNext
  494. If RC~=0 then RETURN
  495. Status ParaPos
  496. MoveToPara Word(result,3) Word(result,4)
  497. i=i+1;Verweis.i=0
  498. Extract
  499. DO WHILE ((RESULT<":")&(RESULT>"/"))
  500. Verweis.i=Verweis.i*10+Result
  501. Cursor Right
  502. Extract
  503. END
  504. If Verweis.i=0 then Break
  505. Cursor Right
  506. AltDown;ShiftDown;Cursor Down
  507. Extract;temp=result
  508. ShiftUp;AltUp
  509. a=a+1
  510. b=0
  511. DO ForEver
  512. b=b+1
  513. tab=Pos(d2c(9),temp)
  514. If tab=0 then;do
  515. Abs.b=Left(temp,Length(temp)-1)
  516. LEAVE
  517. End
  518. Abs.b=Left(temp,tab-1)
  519. temp=Right(temp,Length(temp)-tab)
  520. END
  521. Abschnitt.a=Abs.1
  522. VName.a=Abs.2
  523. VText.a=Abs.3
  524. END
  525. Abschnitt.0=a
  526. VName.0=a
  527. VText.0=a
  528. Verweis.0=i-1
  529. Do i=1 to Verweis.0
  530. GotoSection Abschnitt.i
  531. MoveToLine 1 0
  532. If Verweis.i<10 then Find "ð0"Verweis.i
  533. Else Find "ð"Verweis.i
  534. If (RC=0&loeschen=1) then Delete
  535. GetSectionSetup FirstPage PagePrefix
  536. Parse Var result FP PP
  537. Status Page "Insert"
  538. Seite=result
  539. AktSeite=Seite-FP+1
  540. Seite.i=PP||AktSeite
  541. End
  542. Seite.0=i
  543. GotoSection MerkeAbschnitt
  544. MoveToPara Zurueck
  545. Return
  546. SchabloneAuswerten:
  547. Schablone=MerkeSchablone
  548. If loeschen=1 then Delete
  549. If linken=1 then Call Schreiben
  550. Text=""
  551. Do ForEver
  552. a=pos("%",Schablone)
  553. If a=0 then;do
  554. Text=Text||Schablone
  555. Leave
  556. End
  557. Text=Text||Left(Schablone,a-1)
  558. Schablone=Delstr(Schablone,1,a)
  559. next=Left(Schablone,1)
  560. Schablone=Delstr(Schablone,1,1)
  561. Select
  562. When upper(next)="A" then Text=Text||Abschnitt.Nummer
  563. When upper(next)="K" then Text=Text||VText.Nummer
  564. When upper(next)="S" then Text=Text||Seite.Nummer
  565. Otherwise nop
  566. End
  567. End
  568. EXTRACT
  569. IF Result~=" " THEN TYPE " "
  570. Else Cursor Right
  571. Type Text
  572. If linken=1 then Call Schreiben
  573. EXTRACT
  574. IF Result~=" " THEN
  575. IF Pos(Result,".,!?)")=0 THEN TYPE " "
  576. Else NOP
  577. Else Cursor Right
  578. Return
  579. Schreiben:
  580. Status FontWidth
  581. OldWidth=result
  582. STATUS FontColor
  583. OldColor=result
  584. Width 4
  585. FontColor "Weiß"
  586. Type "æ"
  587. IF Verweis.Nummer<10 THEN TYPE "0"||Verweis.Nummer
  588. ELSE TYPE Verweis.Nummer
  589. FontColor OldColor
  590. Width OldWidth
  591. return
  592. RemoveVerweise:
  593. If Verweis.0=1 then;do
  594. Disi=1
  595. RemoveSection "Verweise" FORCE
  596. Call TR_SETATTRIBUTE(window1,2,'TRAT_DISABLED',1)
  597. Call TR_SETATTRIBUTE(window1,4,'TRAT_DISABLED',1)
  598. Call TR_SETATTRIBUTE(window1,10,'TRAT_DISABLED',1)
  599. Call TR_SETATTRIBUTE(window1,3,'TRAT_DISABLED',1)
  600. End
  601. Else;do
  602. GotoSection "Verweise"
  603. MoveToLine 1 0
  604. IF Verweis.Nummer<10 THEN FIND ("ð0"Verweis.Nummer)
  605. ELSE FIND ("ð"Verweis.Nummer)
  606. AltDown;ShiftDown;Cursor Down;AltUp;ShiftUp
  607. Delete
  608. End
  609. GotoSection MerkeAbschnitt
  610. MoveToPara Zurueck
  611. Return
  612. Fenster:
  613. ende2=0
  614. if akt=0 then Text="auf den verwiesen werden soll."
  615. if loeschen=1 then Text="der gelöscht werden soll."
  616. windowtags=WindowID(2),
  617. WindowPosition('TRWP_CENTERDISPLAY'),
  618. WindowFlags('TRWF_NOZIPGADGET'),
  619. PubScreenName('FinalWriterPubScreen'),
  620. WindowTitle('Verweise'),
  621. 'VertGroupA SpaceS',
  622. 'HorizGroupA SpaceS',
  623. 'VertGroupA SpaceS',
  624. TextH('Bitte Verweisnamen auswählen,'),
  625. TextH(Text),
  626. 'SpaceS EndGroup',
  627. 'SpaceS EndGroup',
  628. 'SpaceS',
  629. 'HorizGroupA SpaceS',
  630. FWListSelC('VName',1,0) 'TRAT_Flags TRLV_ShowSelected',
  631. 'SpaceS EndGroup',
  632. 'SpaceS EndGroup',
  633. 'EndProject'
  634. app2=TR_CREATEAPP('TRCA_NAME Vloeschen')
  635. IF app2 ~='00000000'x THEN;DO
  636. window2=TR_OPENPROJECT(app2,windowtags)
  637. IF window2 ~='00000000'x THEN;do
  638. ende2=0
  639. DO WHILE ~ende2
  640. CALL TR_WAIT(app2,'')
  641. DO WHILE TR_HANDLEMSG(app2,'event')
  642. IF event.trm_class='TRMS_NEWVALUE' THEN;do
  643. SELECT
  644. WHEN event.trm_id=1 THEN;do
  645. Nummer=TR_GETATTRIBUTE(window2,1,'TRAT_VALUE')+1
  646. ende2=1
  647. END
  648. OTHERWISE NOP
  649. END
  650. END
  651. IF event.trm_class='TRMS_CLOSEWINDOW' THEN;DO
  652. Nummer=0
  653. ende2=1
  654. END
  655. END
  656. END
  657. CALL TR_CLOSEPROJECT(window2)
  658. END
  659. CALL TR_DELETEAPP(app2)
  660. END
  661. ELSE
  662. CALL quit('Kann das Fenster nicht öffnen',10)
  663. RETURN
  664. SYNTAX:
  665. CALL quit('Fehler' rc 'in Zeile' sigl '-' ERRORTEXT(rc)||R||SOURCELINE(sigl)||R||'Bitte informieren Sie den Autor...',20)
  666. quit:
  667. PARSE ARG message,rcode
  668. IF app ~='00000000'x THEN;DO
  669. IF message ~='' THEN
  670. ret=rtezrequest(message,"_Okay","ACHTUNG!","rt_pubscrname=FinalWriterPubScreen")
  671. CALL TR_DELETEAPP(app)
  672. END
  673. ELSE
  674. IF message ~='' THEN;DO
  675. SAY message
  676. SAY
  677. OPTIONS PROMPT 'Bitte <RETURN> drücken'
  678. PULL taste
  679. END
  680. address command "flushtrx all"
  681. EXIT(rcode)